home *** CD-ROM | disk | FTP | other *** search
/ Complete Linux / Complete Linux.iso / docs / devel / tcl / tclx7_31.z / tclx7_31 / tcldev / tclX7.3a-p1 / Makefile < prev    next >
Encoding:
Makefile  |  1994-01-25  |  13.3 KB  |  373 lines

  1. # Generated automatically from Makefile.in by configure.
  2. #
  3. # Makefile --
  4. #
  5. # Top-level makefile for Extended Tcl.
  6. #------------------------------------------------------------------------------
  7. # Copyright 1992-1993 Karl Lehenbauer and Mark Diekhans.
  8. #
  9. # Permission to use, copy, modify, and distribute this software and its
  10. # documentation for any purpose and without fee is hereby granted, provided
  11. # that the above copyright notice appear in all copies.  Karl Lehenbauer and
  12. # Mark Diekhans make no representations about the suitability of this
  13. # software for any purpose.  It is provided "as is" without express or
  14. # implied warranty.
  15. #------------------------------------------------------------------------------
  16. # $Id: Makefile.in,v 3.5 1994/01/23 04:41:38 markd Exp $
  17. #------------------------------------------------------------------------------
  18. #
  19. SHELL=/bin/sh
  20.  
  21. #------------------------------------------------------------------------------
  22. # Autoconfig defines that can be overridden in Config.mk
  23.  
  24. CC                = cc
  25. RANLIB            = ranlib
  26. srcdir            = .
  27. srcbasedir        = /home/david/src/tcldev/tclX7.3a-p1
  28. bldbasedir        = /home/david/src/tcldev/tclX7.3a-p1
  29. VPATH             = .
  30. prefix            = $(ROOT)/usr
  31. exec_prefix       = ${prefix}
  32. ARCH              = 
  33. MAN_DIR_SEPARATOR = 
  34. TCL_INST_MASTER   = ${TCL_MASTERDIR}/`tools/tclxversion`
  35. TK_INST_MASTER    = ${TK_MASTERDIR}/`tools/tkxversion`
  36.  
  37. #------------------------------------------------------------------------------
  38. # Include user-editable defines.
  39.  
  40. include ${bldbasedir}/Config.mk
  41.  
  42. #------------------------------------------------------------------------------
  43. # Other macros.
  44.  
  45. LIBTCL.A   = tclmaster/lib${ARCH}/libtcl.a
  46. TCL.H      = tclmaster/include/tcl.h
  47. LIBTK.A    = tkmaster/lib${ARCH}/libtk.a
  48. TK.H       = tkmaster/include/tk.h
  49. INSTCOPY   = ./runtcl tools/instcopy
  50. CPMANPAGES = ./runtcl ${bldbasedir}/tools/cpmanpages
  51.  
  52. #------------------------------------------------------------------------------
  53. # Flags that were passed on the command line that are to be passed on to
  54. # second level makes.
  55.  
  56. PASS_FLAGS = "CC=$(CC)" "CFLAGS=$(CFLAGS)"
  57.  
  58. #------------------------------------------------------------------------------
  59. # The made.tmp files are used to indicate a makefile has successfully added
  60. # it's .o files to a library.  We need to purge the right ones one a new
  61. # library is copied.
  62.  
  63. TCLMADE.TMP = osSupport/made.tmp src/made.tmp
  64. TKMADE.TMP  = tksrc/made.tmp
  65.  
  66. #------------------------------------------------------------------------------
  67.  
  68. all: TCLX runtcl ${TK_BUILD}
  69.  
  70. #------------------------------------------------------------------------------
  71. # Compile the Extended Tcl library and link the Tcl shell.
  72. #
  73.  
  74. TCLX: TCLCOPY runtcl
  75.     cd tools;     ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} all
  76.     cd osSupport; ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} all
  77.     cd src;       ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} all
  78.     cd tclsrc;    ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} all
  79.  
  80. #------------------------------------------------------------------------------
  81. # Copy include and library files from the UCB Tcl distribution to the
  82. # tclmaster directory.
  83. #
  84. TCLCOPY: MKTCLDIRS ${LIBTCL.A} ${TCL.H}
  85.  
  86. MKTCLDIRS:
  87.     -mkdir tclmaster                2>/dev/null; exit 0
  88.     -mkdir tclmaster/lib${ARCH}     2>/dev/null; exit 0
  89.     -mkdir tclmaster/include        2>/dev/null; exit 0
  90.     -mkdir tclmaster/bin${ARCH}     2>/dev/null; exit 0
  91.     -mkdir tclmaster/src            2>/dev/null; exit 0
  92.  
  93. ${LIBTCL.A}: ${TCL_UCB_LIB}/libtcl.a
  94.     rm -f ${LIBTCL.A}
  95.     cp ${TCL_UCB_LIB}/libtcl.a ${LIBTCL.A}
  96.     ${RANLIB} ${LIBTCL.A}
  97.  
  98. ${TCL.H}: ${TCL_UCB_SRC}/tcl.h
  99.     rm -f ${TCL.H}
  100.     cp ${TCL_UCB_SRC}/tcl.h ${TCL.H}
  101.  
  102. #------------------------------------------------------------------------------
  103. # Generate a wish shell {wishx} with Extended Tcl commands.
  104. #
  105.  
  106. WISHX: TKCOPY runwishx
  107.     cd tksrc;    ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} all
  108.     cd tktclsrc; ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} all
  109.  
  110. #------------------------------------------------------------------------------
  111. # Copy include and library files from the UCB Tk distribution to the
  112. # tkmaster directory.
  113. #
  114.  
  115. TKCOPY: MKTKDIRS ${LIBTK.A} ${TK.H}
  116.  
  117. MKTKDIRS:
  118.     -mkdir tkmaster                2>/dev/null; exit 0
  119.     -mkdir tkmaster/lib${ARCH}     2>/dev/null; exit 0
  120.     -mkdir tkmaster/include        2>/dev/null; exit 0
  121.     -mkdir tkmaster/bin${ARCH}     2>/dev/null; exit 0
  122.     -mkdir tkmaster/src            2>/dev/null; exit 0
  123.  
  124. ${LIBTK.A}: ${TK_UCB_LIB}/libtk.a
  125.     rm -f ${LIBTK.A}
  126.     cp ${TK_UCB_LIB}/libtk.a ${LIBTK.A}
  127.     ${RANLIB} ${LIBTK.A}
  128.  
  129. ${TK.H}: ${TK_UCB_SRC}/tk.h
  130.     rm -f ${TK.H}
  131.     cp ${TK_UCB_SRC}/tk.h ${TK.H}
  132.  
  133. #------------------------------------------------------------------------------
  134. # Generate scripts to point the TCL_LIBRARY/TK_LIBRARY environment variable at
  135. # the local master directories so tcl & wishx can be run before installing.
  136.  
  137. runtcl:
  138.     @echo ':'                                                  >runtcl
  139.     @echo '# script for testing Tcl before installation'      >>runtcl
  140.     @echo "TCL_LIBRARY=`pwd`/tclmaster"                       >>runtcl
  141.     @echo "TCL_PROGRAM=`pwd`/tclmaster/bin${ARCH}/tcl"        >>runtcl
  142.     @echo "export TCL_LIBRARY TCL_PROGRAM"                    >>runtcl
  143.     @echo "if [ \$$# = 0 ]"                                   >>runtcl
  144.     @echo "then"                                              >>runtcl
  145.     @echo "    exec \$$TCL_PROGRAM"                           >>runtcl
  146.     @echo "else"                                              >>runtcl
  147.     @echo "    exec \$$TCL_PROGRAM \"\$$@\""                  >>runtcl
  148.     @echo "fi"                                                >>runtcl
  149.     chmod a+rx runtcl
  150.  
  151. runwishx:
  152.     @echo ':'                                                  >runwishx
  153.     @echo '# script for testing wishx before installation'    >>runwishx
  154.     @echo "TCL_LIBRARY=`pwd`/tclmaster"                       >>runwishx
  155.     @echo "TK_LIBRARY=`pwd`/tkmaster"                         >>runwishx
  156.     @echo "TCL_PROGRAM=`pwd`/tclmaster/bin${ARCH}/tcl"        >>runwishx
  157.     @echo "WISHX=`pwd`/tkmaster/bin${ARCH}/wishx"             >>runwishx
  158.     @echo "export TCL_LIBRARY TK_LIBRARY TCL_PROGRAM"         >>runwishx
  159.     @echo "if [ \$$# = 0 ]"                                   >>runwishx
  160.     @echo "then"                                              >>runwishx
  161.     @echo "    exec \$$WISHX"                                 >>runwishx
  162.     @echo "else"                                              >>runwishx
  163.     @echo "    exec \$$WISHX \"\$$@\""                        >>runwishx
  164.     @echo "fi"                                                >>runwishx
  165.     chmod a+rx runwishx
  166.  
  167. #------------------------------------------------------------------------------
  168. # Test to see if the C++ include file compiles and links.
  169.  
  170. tcl++:
  171.     cd src;${MAKE} -${MAKEFLAGS} tcl++
  172.  
  173. #------------------------------------------------------------------------------
  174. # Run the UCB and Extended Tcl tests.
  175.  
  176. test: ucbtests extdtests
  177.  
  178. ucbtests: all
  179.     @echo "***************************************************************"
  180.     @echo "*** Expect warnings about not having the following commands:"
  181.     @echo "***     testasync"
  182.     @echo "***     testcmdinfo"
  183.     @echo "***     testdcall"
  184.     @echo "***     testdstring"
  185.     @echo "***     testlink"
  186.     @echo "***"
  187.     @echo "*** Expect warnings about not having the following math functions:"
  188.     @echo "***     T1"
  189.     @echo "***     T2"
  190.     @echo "***************************************************************"
  191.     @echo ""
  192.     ./runtcl -c "cd ${TCL_UCB_SRC}/tests;source ${srcbasedir}/tests/all"
  193.  
  194. extdtests: all
  195.     ./runtcl -c "cd tests;source all"
  196.  
  197. tktest: all
  198.     @echo "***************************************************************"
  199.     @echo "*** Expect warnings about not having the following commands:"
  200.     @echo "***     testmakexists"
  201.     @echo "***************************************************************"
  202.     @echo ""
  203.     cd ${srcdir}/tktests ;\
  204.         ${bldbasedir}/runwishx -f tktests.tcl -n wish ${TK_UCB_SRC}
  205.  
  206. #------------------------------------------------------------------------------
  207. # Rebuild help files.  The are shipped with TclX, but can be rebuilt if Tcl or
  208. # Tk versions have changed.
  209.  
  210. buildhelp: buildtclhelp buildtkhelp
  211.  
  212. buildtclhelp:
  213.     cd tclsrc;   ${MAKE} -${MAKEFLAGS} buildtclhelp
  214.  
  215. buildtkhelp:
  216.     cd tktclsrc; ${MAKE} -${MAKEFLAGS} buildtkhelp
  217.  
  218. #------------------------------------------------------------------------------
  219. # Install Extended Tcl using the standard model
  220.  
  221. install: all TCLXINSTALL TCLXINSTALL-EXEC \
  222.              ${TK_BUILD}MAYBE ${TK_BUILD}MAYBE-EXEC
  223.  
  224. install-exec: all TCLXINSTALL-EXEC ${TK_BUILD}MAYBE-EXEC
  225.  
  226. TCLXINSTALL:
  227.     @echo ""
  228.     @echo "   Install Extended Tcl using standard model"
  229.     @echo ""
  230.     rm -rf ${TCL_INST_MASTER}
  231.     ${INSTCOPY} tclmaster/*.tcl tclmaster/*.tlib tclmaster/*.tndx \
  232.        tclmaster/help tclmaster/src ${TCL_INST_MASTER}
  233.     ${INSTCOPY} tclmaster/include/tclExtend.h tclmaster/include/tcl++.h \
  234.        ${TCL_INCLUDEDIR}
  235.     ${CPMANPAGES} -rmcat @${MAN_DIR_SEPARATOR}@ \
  236.         ${TCL_MAN_CMD_SECTION} ${TCL_MAN_FUNC_SECTION} @@ \
  237.         ${srcbasedir}/man ${TCL_MAN_BASEDIR}
  238.  
  239. TCLXINSTALL-EXEC:
  240.     ${INSTCOPY} tclmaster/bin${ARCH}/tcl ${TCL_BINDIR}
  241.     ${INSTCOPY} tclmaster/lib${ARCH}/libtclx.a ${TCL_LIBDIR}
  242.     ${RANLIB} ${TCL_LIBDIR}/libtclx.a
  243.  
  244. TKXINSTALL:
  245.     rm -rf ${TK_INST_MASTER}
  246.     ${INSTCOPY} tkmaster/*.tcl tkmaster/*.tlib tkmaster/*.tndx \
  247.        tkmaster/help tkmaster/src tkmaster/*.ps tkmaster/demos \
  248.        ${TK_INST_MASTER}
  249.  
  250. TKXINSTALL-EXEC:
  251.     ${INSTCOPY} tkmaster/bin${ARCH}/wishx ${TK_BINDIR}
  252.     ${INSTCOPY} tkmaster/bin${ARCH}/tclhelp ${TK_BINDIR}
  253.     ${INSTCOPY} tkmaster/lib${ARCH}/libtkx.a ${TK_LIBDIR}
  254.     ${RANLIB} ${TK_LIBDIR}/libtkx.a
  255.  
  256. # Fake targets to decide if we install wishx or not.
  257.  
  258. MAYBE:
  259. MAYBE-EXEC:
  260.  
  261. WISHXMAYBE: TKXINSTALL
  262. WISHXMAYBE-EXEC: TKXINSTALL-EXEC
  263.  
  264. #------------------------------------------------------------------------------
  265. # Install Extended Tcl using the master directory model.
  266.  
  267. install-master: all MASTER-NOTE TCLXMINSTALL ${TK_BUILD}MMAYBE
  268.  
  269. install-master-exec: all MASTER-NOTE TCLXMINSTALL-EXEC ${TK_BUILD}MMAYBE-EXEC
  270.  
  271. MASTER-NOTE:
  272.     @echo ""
  273.     @echo "*************************************************************"
  274.     @echo "*** TclX currently builds symbolic links to the bin files ***"
  275.     @echo "*** in the master directories.  If you need links to the  ***"
  276.     @echo "*** include or man files you must build them by hand.     ***"
  277.     @echo "*************************************************************"
  278.     @echo ""
  279.  
  280. TCLXMINSTALL:
  281.     @echo ""
  282.     @echo "   Install TclX master directory"
  283.     @echo ""
  284.     rm -rf ${TCL_INST_MASTER}
  285.     ${INSTCOPY} -dirname tclmaster ${TCL_INST_MASTER}
  286.     ${RANLIB} ${TCL_INST_MASTER}/lib${ARCH}/*.a
  287.     ${CPMANPAGES} @${MAN_DIR_SEPARATOR}@ \
  288.         ${TCL_MAN_CMD_SECTION} ${TCL_MAN_FUNC_SECTION} @@ \
  289.         ${TCL_UCB_SRC}/doc ${TCL_INST_MASTER}/man
  290.     ${CPMANPAGES} @${MAN_DIR_SEPARATOR}@ \
  291.         ${TCL_MAN_CMD_SECTION} ${TCL_MAN_FUNC_SECTION} @@ \
  292.         ${srcbasedir}/man ${TCL_INST_MASTER}/man
  293.     test -d ${TCL_BINDIR} || mkdir ${TCL_BINDIR}
  294.     rm -f ${TCL_BINDIR}/tcl
  295.     ln -s ${TCL_INST_MASTER}/bin${ARCH}/tcl ${TCL_BINDIR}/tcl
  296.  
  297. TCLXMINSTALL-EXEC:
  298.     @echo ""
  299.     @echo "   Install TclX executables only"
  300.     @echo ""
  301.     ${INSTCOPY} tclmaster/bin${ARCH} ${TCL_INST_MASTER}
  302.     ${INSTCOPY} tclmaster/lib${ARCH} ${TCL_INST_MASTER}
  303.     ${RANLIB} ${TCL_INST_MASTER}/lib${ARCH}/*.a
  304.     test -d ${TCL_BINDIR} || ${TCL_BINDIR}
  305.     rm -f ${TCL_BINDIR}/tcl
  306.     ln -s ${TCL_INST_MASTER}/bin${ARCH}/tcl ${TCL_BINDIR}/tcl
  307.  
  308.  
  309. TKXMINSTALL:
  310.     @echo ""
  311.     @echo "   Install TkX master directory"
  312.     @echo ""
  313.     rm -rf ${TK_INST_MASTER}
  314.     ${INSTCOPY} -dirname tkmaster ${TK_INST_MASTER}
  315.     ${RANLIB} ${TK_INST_MASTER}/lib${ARCH}/*.a
  316.     ${CPMANPAGES} @${MAN_DIR_SEPARATOR}@ \
  317.         ${TK_MAN_CMD_SECTION} ${TK_MAN_FUNC_SECTION} \
  318.         ${TK_MAN_UNIXCMD_SECTION} \
  319.         ${TK_UCB_SRC}/doc ${TK_INST_MASTER}/man
  320.     test -d ${TCL_BINDIR} || mkdir ${TCL_BINDIR}
  321.     rm -f ${TCL_BINDIR}/wishx
  322.     ln -s ${TK_INST_MASTER}/bin${ARCH}/wishx ${TCL_BINDIR}/wishx
  323.     rm -f ${TCL_BINDIR}/tclhelp
  324.     ln -s ${TK_INST_MASTER}/bin${ARCH}/tclhelp ${TCL_BINDIR}/tclhelp
  325.  
  326. TKXMINSTALL-EXEC:
  327.     @echo ""
  328.     @echo "   Install TkX executables only"
  329.     @echo ""
  330.     ${INSTCOPY} tkmaster/bin${ARCH} ${TK_INST_MASTER}
  331.     ${INSTCOPY} tkmaster/lib${ARCH} ${TK_INST_MASTER}
  332.     ${RANLIB} ${TK_INST_MASTER}/lib${ARCH}/*.a
  333.     test -d ${TCL_BINDIR} || mkdir ${TCL_BINDIR}
  334.     rm -f ${TCL_BINDIR}/wishx
  335.     ln -s ${TK_INST_MASTER}/bin${ARCH}/wishx ${TCL_BINDIR}/wishx
  336.     rm -f ${TCL_BINDIR}/tclhelp
  337.     ln -s ${TK_INST_MASTER}/bin${ARCH}/tclhelp ${TCL_BINDIR}/tclhelp
  338.  
  339. # Fake targets to decide if we install wishx or not.
  340.  
  341. MMAYBE:
  342. MMAYBE-EXEC:
  343.  
  344. WISHXMMAYBE: TKXMINSTALL
  345. WISHXMMAYBE-EXEC: TKXMINSTALL-EXEC
  346.  
  347. #------------------------------------------------------------------------------
  348. # Clean up all files that were built by make.
  349.  
  350. clean:
  351.     cd tools;     ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} clean
  352.     cd osSupport; ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} clean
  353.     cd src;       ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} clean
  354.     cd tclsrc;    ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} clean
  355.     cd tksrc;     ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} clean
  356.     cd tktclsrc;  ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} clean
  357.     -rm -f runtcl runwishx
  358.     -rm -rf tclmaster tkmaster
  359.  
  360. #------------------------------------------------------------------------------
  361. # Restore to the distributed state.
  362.  
  363. distclean: clean
  364.     cd tools;     ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} distclean
  365.     cd osSupport; ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} distclean
  366.     cd src;       ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} distclean
  367.     cd tclsrc;    ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} distclean
  368.     cd tksrc;     ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} distclean
  369.     cd tktclsrc;  ${MAKE} -${MAKEFLAGS} ${PASS_FLAGS} distclean
  370.     rm -f Makefile config.status
  371.  
  372.